package cn.net.xyan.blossom.core.utils

import org.springframework.data.domain.Sort
import org.springframework.data.domain.PageRequest


fun Sort.Direction.pageable(propertyName: String,page:Int = 0,size:Int = Int.MAX_VALUE): PageRequest {
    return PageRequest(
            page, size, Sort(
            Sort.Order(this, propertyName)
    )
    )
}